﻿Imports OMANE.Common.UI
Imports System.Windows.Data
Imports System.Windows.Media.Imaging
Imports System.Windows.Media

Public Class EtatChampsConverter
    Implements IValueConverter

    Public Function Convert(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.Convert
        Dim Etat As System.Drawing.Color = DirectCast(value, System.Drawing.Color)
        Dim EtatColor As Color
        EtatColor.R = Etat.R
        EtatColor.G = Etat.G
        EtatColor.B = Etat.B
        EtatColor.A = Etat.A
        Return New SolidColorBrush(EtatColor)
    End Function

    Public Function ConvertBack(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.ConvertBack
        Throw New NotImplementedException
    End Function
End Class
